package com.penghaisoft.microwms.material.web.outwarehouse.controller;

import com.penghaisoft.microwms.common.controller.BaseController;
import com.penghaisoft.microwms.common.data.model.RawHandOutSn;
import com.penghaisoft.microwms.common.dto.TransResult;
import com.penghaisoft.microwms.common.page.Pager;
import com.penghaisoft.microwms.material.web.outwarehouse.service.RawHandOutSnService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * 原材料手工出库明细
 * Created by 王治国 on 2018/5/25.
 */
@RestController
@RequestMapping(value = "raw/rawHandOutSn")
@Slf4j
public class RawHandOutSnController extends BaseController {

    @Autowired
    private RawHandOutSnService rawHandOutSnService;

    @PostMapping("list")
    public TransResult findAll(@RequestParam(name = "page", defaultValue = "1") int page,
                               @RequestParam(name = "rows", defaultValue = "10") int rows, RawHandOutSn rawHandOutSn) {

        Pager<RawHandOutSn> result = rawHandOutSnService.findAll(page, rows, rawHandOutSn);
        return success(result);
    }

}
